<!DOCTYPE html>
<!-- saved from url=(0119)http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/ -->
<html lang="en-US"><!--<![endif]--><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt | electronicsblog.net</title>
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="stylesheet" type="text/css" media="all" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/A.style.css.pagespeed.cf.K7D8neHUQF.css">
<link rel="pingback" href="http://www.electronicsblog.net/xmlrpc.php">
<!--[if lt IE 9]>
<script src="http://www.electronicsblog.net/wp-content/themes/twentyeleven/js/html5.js" type="text/javascript"></script>
<![endif]-->
<link rel="alternate" type="application/rss+xml" title="electronicsblog.net » Feed" href="http://www.electronicsblog.net/feed/">
<link rel="alternate" type="application/rss+xml" title="electronicsblog.net » Comments Feed" href="http://www.electronicsblog.net/comments/feed/">
<link rel="alternate" type="application/rss+xml" title="electronicsblog.net » Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt Comments Feed" href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/feed/">
<style id="wp-downloadmanager-css" media="all">.wp-downloadmanager-paging a,.wp-downloadmanager-paging a:link{padding:2px 4px 2px 4px;margin:2px;text-decoration:none;border:1px solid #06c;color:#06c;background-color:#fff}.wp-downloadmanager-paging a:visited{padding:2px 4px 2px 4px;margin:2px;text-decoration:none;border:1px solid #06c;color:#06c;background-color:#fff}.wp-downloadmanager-paging a:hover{border:1px solid #000;color:#000;background-color:#fff}.wp-downloadmanager-paging a:active{padding:2px 4px 2px 4px;margin:2px;text-decoration:none;border:1px solid #06c;color:#06c;background-color:#fff}.wp-downloadmanager-paging span.pages{padding:2px 4px 2px 4px;margin:2px 2px 2px 2px;color:#000;border:1px solid #000;background-color:#fff}.wp-downloadmanager-paging span.current{padding:2px 4px 2px 4px;margin:2px;font-weight:bold;border:1px solid #000;color:#000;background-color:#fff}.wp-downloadmanager-paging span.extend{padding:2px 4px 2px 4px;margin:2px;border:1px solid #000;color:#000;background-color:#fff}.download-search-highlight{color:red}</style>
<script async="" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/saved_resource"></script><script id="shr-analytics" data-analytics-script-placeholder="true"></script><script async="" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/prum.min.js"></script><script type="text/javascript" async="" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/dc.js"></script><script type="text/javascript">//<![CDATA[
var SHRSB_Globals={"src":"http:\/\/www.electronicsblog.net\/wp-content\/plugins\/sexybookmarks\/spritegen_default","perfoption":null,"twitter_template":"%24%7Btitle%7D+-+%24%7Bshort_link%7D","locale":"0","shortener":"google","shortener_key":"","pubGaSocial":0,"pubGaKey":""};
//]]></script><script type="text/javascript">//<![CDATA[
var addComment={moveForm:function(a,b,c,d){var e,f=this,g=f.I(a),h=f.I(c),i=f.I("cancel-comment-reply-link"),j=f.I("comment_parent"),k=f.I("comment_post_ID");if(g&&h&&i&&j){f.respondId=c,d=d||!1,f.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",h.parentNode.insertBefore(e,h)),g.parentNode.insertBefore(h,g.nextSibling),k&&d&&(k.value=d),j.value=b,i.style.display="",i.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{f.I("comment").focus()}catch(l){}return!1}},I:function(a){return document.getElementById(a)}};
//]]></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.electronicsblog.net/xmlrpc.php?rsd">
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.electronicsblog.net/wp-includes/wlwmanifest.xml"> 
<link rel="prev" title="Arduino frequency counter/duty cycle meter" href="http://www.electronicsblog.net/arduino-frequency-counterduty-cycle-meter/">
<link rel="next" title="Simple angle meter using ADXL335 accelerometer [Arduino]" href="http://www.electronicsblog.net/simple-angle-meter-using-adxl335-accelerometer-arduino/">
<meta name="generator" content="WordPress 3.8.1">
<link rel="shortlink" href="http://www.electronicsblog.net/?p=339">

<!-- ADD TO HEADER - START -->
<script type="text/javascript">var _gaq=_gaq||[];_gaq.push(['_setAccount','UA-17357716-1']);_gaq.push(['_trackPageview']);(function(){var ga=document.createElement('script');ga.type='text/javascript';ga.async=true;ga.src=('https:'==document.location.protocol?'https://':'http://')+'stats.g.doubleclick.net/dc.js';var s=document.getElementsByTagName('script')[0];s.parentNode.insertBefore(ga,s);})();</script>
<!-- ADD TO HEADER - END -->
<link href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/A.shCore.css.pagespeed.cf.SIgGoxUl8B.css" type="text/css" rel="stylesheet"><style id="shTheme">.syntaxhighlighter{background-color:#fff!important}.syntaxhighlighter .line.highlighted .number{color:#000!important}.syntaxhighlighter .line.highlighted.alt1,.syntaxhighlighter .line.highlighted.alt2{background-color:#e0e0e0!important}.syntaxhighlighter .line .number{color:#afafaf!important}.syntaxhighlighter .line .content{border-left:3px solid #6ce26c!important;color:#000!important}.syntaxhighlighter.printing .line .content{border:0!important}.syntaxhighlighter .line.alt1{background-color:#fff!important}.syntaxhighlighter .line.alt2{background-color:#f8f8f8!important}.syntaxhighlighter .toolbar{background-color:#f8f8f8!important;border:#e7e5dc solid 1px!important}.syntaxhighlighter .toolbar a{color:#a0a0a0!important}.syntaxhighlighter .toolbar a:hover{color:red!important}.syntaxhighlighter .plain,.syntaxhighlighter .plain a{color:#000!important}.syntaxhighlighter .comments,.syntaxhighlighter .comments a{color:#008200!important}.syntaxhighlighter .string,.syntaxhighlighter .string a{color:#00f!important}.syntaxhighlighter .keyword{color:#069!important;font-weight:bold!important}.syntaxhighlighter .preprocessor{color:gray!important}.syntaxhighlighter .variable{color:#a70!important}.syntaxhighlighter .value{color:#090!important}.syntaxhighlighter .functions{color:#ff1493!important}.syntaxhighlighter .constants{color:#06c!important}.syntaxhighlighter .script{background-color:#ff0!important}.syntaxhighlighter .color1,.syntaxhighlighter .color1 a{color:gray!important}.syntaxhighlighter .color2,.syntaxhighlighter .color2 a{color:#ff1493!important}.syntaxhighlighter .color3,.syntaxhighlighter .color3 a{color:red!important}</style><script src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shCore.js,Mjm.dX-s694vQg.js+shBrushAS3.js,Mjm.NTea2bOU2B.js+shBrushBash.js,Mj.js"></script><script>eval(mod_pagespeed_qE$Q9PNjG4);</script>
<script>eval(mod_pagespeed_ZfJqGYSkk6);</script>
<script>eval(mod_pagespeed_6MrtSfxUh7);</script>
<script>eval(mod_pagespeed_rShK$GV2Ty);</script>
<script>eval(mod_pagespeed_RbTKvjQ8Ny);</script>
<script>eval(mod_pagespeed_vWmxxs_SrQ);</script>
<script>eval(mod_pagespeed_yON2AV2RkM);</script>
<script>eval(mod_pagespeed__Xnv2G0Ze6);</script>
<script>eval(mod_pagespeed_v0DX$I$Soy);</script>
<script>eval(mod_pagespeed_xQ892LjVdT);</script>
<script>eval(mod_pagespeed_UHvUUt4amB);</script>
<script>eval(mod_pagespeed_U8VTDfdw4x);</script>
<script>eval(mod_pagespeed_l_cfmgoAND);</script>
<script>eval(mod_pagespeed_1g09Arcawk);</script>
<script>eval(mod_pagespeed_f2rb1HKcs_);</script>
<script>eval(mod_pagespeed_wvkBySZDmi);</script>
<script>eval(mod_pagespeed_4wcG6yV6ZV);</script>
<script>eval(mod_pagespeed_Zyla6BdQiL);</script>
<script>eval(mod_pagespeed_Qs4zG3sZTG);</script>
<script>eval(mod_pagespeed_polDrm4WAm);</script>
<script>eval(mod_pagespeed_bl7Vx6LO8T);</script>
<script>eval(mod_pagespeed_CGWLw6ewhp);</script>
<script type="text/javascript">SyntaxHighlighter.config.clipboardSwf='http://www.electronicsblog.net/wp-content/plugins/easy-google-syntax-highlighter/scripts/clipboard.swf';SyntaxHighlighter.all();</script>

<script>var _prum=[['id','523e900babe53d5957000000'],['mark','firstbyte',(new Date()).getTime()]];(function(){var s=document.getElementsByTagName('script')[0],p=document.createElement('script');p.async='async';p.src='//rum-static.pingdom.net/prum.min.js';s.parentNode.insertBefore(p,s);})();</script>


<!-- Shareaholic Content Tags -->

<meta name="shareaholic:site_name" content="electronicsblog.net">
<meta name="shareaholic:image" content="http://www.electronicsblog.net/wp-content/uploads/schematic-300x136.png">

<!-- / Shareaholic Content Tags -->



<!-- Shareaholic - Open Graph Tags -->

<meta property="og:image" content="http://www.electronicsblog.net/wp-content/uploads/schematic-300x136.png">

<!-- / Shareaholic - Open Graph Tags -->

	<style type="text/css">.recentcomments a{display:inline!important;padding:0!important;margin:0!important}</style>

<!-- All in One SEO Pack 2.1.3 by Michael Torbert of Semper Fi Web Design[355,476] -->
<meta name="keywords" content="attiny13,iar embedded workbench for atmel avr,interrupt,timer">

<link rel="canonical" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net.htm">
<!-- /all in one seo pack -->
<style type="text/css" id="custom-background-css">body.custom-background{background-color:#e2e2e2}</style>
<link rel="stylesheet" type="text/css" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shCore.css"><link rel="stylesheet" type="text/css" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shThemeArduino.css"><style type="text/css" id="syntaxhighlighteranchor"></style>
<script type="text/javascript" async="" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/embed.js"></script><script src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/jquery.min.js" type="text/javascript"></script><script type="text/javascript" async="" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shareaholic.js"></script><script type="text/javascript" id="shr-google-analytics" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/ga.js" data-cfasync="false" async=""></script><script type="text/javascript" id="shareaholic-partners" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/partners.js" data-cfasync="false" async=""></script><link rel="stylesheet" media="screen" id="shareaholic-publisher-css" href="http://www.electronicsblog.net/wp-content/plugins/sexybookmarks/spritegen_default/sprite.css"><style type="text/css">.shareaholic-arrow-down{ position: absolute !important; left:45% !important; width: 0 !important; height: 0 !important; border-left: 6px solid transparent !important; border-right: 6px solid transparent !important; border-top: 6px solid #000000 !important; }.shareaholic-tip-text{font-size:12px !important; line-height:120% !important; background: #000000 !important; color: #ffffff !important; padding: 5px !important; border-radius: 5px !important; -webkit-border-radius:5px; !important; -moz-border-radius:5px; !important}</style><script type="text/javascript" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shareaholic_tools.js" data-cfasync="false" async=""></script><link rel="stylesheet" type="text/css" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/cookie_consent.css" id="cookie_consent_css"><link rel="stylesheet" type="text/css" href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/recommendations.css" id="recommendations_css"><script src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/alfie.f51946af45e0b561c60f768335c9eb79.js" async="" charset="UTF-8"></script></head>

<body class="single single-post postid-339 single-format-standard custom-background single-author singular two-column right-sidebar">
<div id="page" class="hfeed">
	<header id="branding" role="banner">
			<hgroup>
				<h1 id="site-title"><span><a href="http://www.electronicsblog.net/" title="electronicsblog.net" rel="home">electronicsblog.net</a></span></h1>
				<h2 id="site-description">Just another electronics blog</h2>
			</hgroup>

						<a href="http://www.electronicsblog.net/">
									<img src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/940x198xlogo54.png.pagespeed.ic.W2SQW-FDo5.jpg" width="940" height="198" alt="" pagespeed_url_hash="3214727180">
							</a>
			
								<form method="get" id="searchform" action="http://www.electronicsblog.net/">
		<label for="s" class="assistive-text">Search</label>
		<input type="text" class="field" name="s" id="s" placeholder="Search">
		<input type="submit" class="submit" name="submit" id="searchsubmit" value="Search">
	</form>
			
			<nav id="access" role="navigation">
				<h3 class="assistive-text">Main menu</h3>
								<div class="skip-link"><a class="assistive-text" href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#content" title="Skip to primary content">Skip to primary content</a></div>
				<div class="skip-link"><a class="assistive-text" href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#secondary" title="Skip to secondary content">Skip to secondary content</a></div>
								<div class="menu"><ul><li><a href="http://www.electronicsblog.net/">Home</a></li><li class="page_item page-item-2"><a href="http://www.electronicsblog.net/about/">About</a></li><li class="page_item page-item-374"><a href="http://www.electronicsblog.net/contact/">Contact</a></li></ul></div>
			</nav><!-- #access -->
	</header><!-- #branding -->


	<div id="main">

		<div id="primary">
			<div id="content" role="main">

				
					<nav id="nav-single">
						<h3 class="assistive-text">Post navigation</h3>
						<span class="nav-previous"><a href="http://www.electronicsblog.net/arduino-frequency-counterduty-cycle-meter/" rel="prev"><span class="meta-nav">←</span> Previous</a></span>
						<span class="nav-next"><a href="http://www.electronicsblog.net/simple-angle-meter-using-adxl335-accelerometer-arduino/" rel="next">Next <span class="meta-nav">→</span></a></span>
					</nav><!-- #nav-single -->

					
<article id="post-339" class="post-339 post type-post status-publish format-standard hentry category-attiny13-2 tag-attiny13 tag-iar-embedded-workbench-for-atmel-avr tag-interrupt tag-timer">
	<header class="entry-header">
		<h1 class="entry-title">Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt</h1>

				<div class="entry-meta">
			<span class="sep">Posted on </span><a href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net.htm" title="18:42" rel="bookmark"><time class="entry-date" datetime="2011-03-12T18:42:35+00:00">March 12, 2011</time></a><span class="by-author"> <span class="sep"> by </span> <span class="author vcard"><a class="url fn n" href="http://www.electronicsblog.net/author/dariusss/" title="View all posts by Darius" rel="author">Darius</a></span></span>		</div><!-- .entry-meta -->
			</header><!-- .entry-header -->

	<div class="entry-content">
		<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><script type="text/javascript">google_ad_client="ca-pub-7502902505848136";google_ad_slot="6009406043";google_ad_width=300;google_ad_height=250;</script><br>
<script type="text/javascript" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/show_ads.js"></script><ins style="display:inline-table;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:250px;margin:0;padding:0;position:relative;visibility:visible;width:300px;background-color:transparent"><iframe width="300" height="250" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&amp;&amp;s.handlers,h=H&amp;&amp;H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&amp;&amp;d&amp;&amp;(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;"></iframe></ins></ins>
</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/schematic.png"><img class="alignnone size-medium wp-image-361" title="schematic" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/schematic-300x136.png" alt="" width="300" height="136" pagespeed_url_hash="688472791"></a><br>
This short guide is about starting first project with IAR Embedded Workbench for Atmel AVR. IDE is not free, bet there is free <a href="http://supp.iar.com/Download/SW/?item=EWAVR-KS4" target="_blank">KickStart edition with 4KB code limit</a>.</p>
<p><span id="more-339"></span></p>
<p>After IAR Embedded Workbench launch choose to create a new project.</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/create-project.png"><img class="alignnone size-medium wp-image-344" title="create project" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/create-project-300x162.png" alt="" width="300" height="162" pagespeed_url_hash="1399848233"></a></p>
<p>Please select “C” and AVR Studio compatible output.</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/C.png"><img class="alignnone size-medium wp-image-345" title="C" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/C-300x249.png" alt="" width="300" height="249" pagespeed_url_hash="51938772"></a></p>
<p>Save project with desired name.</p>
<p>Click right mouse button on project name and select Options.</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/options.png"><img class="alignnone size-medium wp-image-348" title="options" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/options-300x233.png" alt="" width="300" height="233" pagespeed_url_hash="1749960082"></a></p>
<p>At General Options =&gt; Target select processor’s type.</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/cpu.png"><img class="alignnone size-medium wp-image-350" title="cpu" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/cpu-300x270.png" alt="" width="300" height="270" pagespeed_url_hash="2486088937"></a></p>
<p>At Linker ==&gt; Output select hex format for output.</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/hex.png"><img class="alignnone size-medium wp-image-351" title="hex" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/hex-300x270.png" alt="" width="300" height="270" pagespeed_url_hash="367773576"></a></p>
<p>If you want to use bit definitions in code like this one:</p>
<div id="highlighter_159023" class="syntaxhighlighter  "><div class="bar"><div class="toolbar"><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#viewSource" title="view source" class="item viewSource" style="width: 16px; height: 16px;">view source</a><div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_159023_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_159023" menu="false" src="http://www.electronicsblog.net/wp-content/plugins/syntaxhighlighter/syntaxhighlighter2/scripts/clipboard.swf"></div><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#printSource" title="print" class="item printSource" style="width: 16px; height: 16px;">print</a><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#about" title="?" class="item about" style="width: 16px; height: 16px;">?</a></div></div><div class="lines"><div class="line alt1"><table><tbody><tr><td class="number"><code>1</code></td><td class="content"><code class="plain">TIMSK0 |= (1&lt;&lt;TOIE0);</code></td></tr></tbody></table></div></div></div>
<p>At General Options ==&gt; System check “Enable bit definitions in I/O-include files”</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/def.png"><img src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/def-300x270.png" alt="" title="def" width="300" height="270" class="alignnone size-medium wp-image-367" pagespeed_url_hash="1063316146"></a></p>
<p>That’s it for configuration. Let’s start writing code.</p>
<div id="highlighter_765549" class="syntaxhighlighter  "><div class="bar"><div class="toolbar"><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#viewSource" title="view source" class="item viewSource" style="width: 16px; height: 16px;">view source</a><div class="item copyToClipboard"><embed width="16" height="16" id="highlighter_765549_clipboard" type="application/x-shockwave-flash" title="copy to clipboard" allowscriptaccess="always" wmode="transparent" flashvars="highlighterId=highlighter_765549" menu="false" src="http://www.electronicsblog.net/wp-content/plugins/syntaxhighlighter/syntaxhighlighter2/scripts/clipboard.swf"></div><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#printSource" title="print" class="item printSource" style="width: 16px; height: 16px;">print</a><a href="http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/#about" title="?" class="item about" style="width: 16px; height: 16px;">?</a></div></div><div class="lines"><div class="line alt1"><table><tbody><tr><td class="number"><code>1</code></td><td class="content"><code class="comments">// Attiny13 LED blinker from <a href="http://www.electronicsblog.net/">http://www.electronicsblog.net</a></code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>2</code></td><td class="content"><code class="comments">// LED toggles every time hardware 8 bit counter overflows</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>3</code></td><td class="content"><code class="comments">//9600000/8/1024/1024 = ~1.4 Hz (overflow frequency)</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>4</code></td><td class="content"><code class="comments">// LED is connected (with resistor in series) to PB3 (pin 2)</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>5</code></td><td class="content"><code class="preprocessor">#include &lt;iotiny13.h&gt;</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>6</code></td><td class="content"><code class="preprocessor">#include &lt;intrinsics.h&gt;</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>7</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>8</code></td><td class="content"><code class="comments">//vector address can be found at Attiny documentation, but it must be multiplied by 2.</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>9</code></td><td class="content"><code class="comments">//<a href="http://www.atmel.com/dyn/resources/prod_documents/doc2535.pdf">http://www.atmel.com/dyn/resources/prod_documents/doc2535.pdf</a> Page 44.</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>10</code></td><td class="content"><code class="comments">// 0x0003 TIM0_OVF Timer/Counter Overflow</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>11</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>12</code></td><td class="content"><code class="preprocessor">#pragma vector=0x03 * 2</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>13</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>14</code></td><td class="content"><code class="comments">//timer overflow function, name doesn't matter.</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>15</code></td><td class="content"><code class="plain">__interrupt </code><code class="keyword bold">void</code> <code class="plain">timer_overflow(</code><code class="keyword bold">void</code><code class="plain">)</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>16</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>17</code></td><td class="content"><code class="plain">{</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>18</code></td><td class="content"><code class="comments">//LED toggle</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>19</code></td><td class="content"><code class="spaces">&nbsp;</code><code class="plain">PORTB ^= 1 &lt;&lt; 3;</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>20</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>21</code></td><td class="content"><code class="plain">}</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>22</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>23</code></td><td class="content"><code class="color1 bold">int</code> <code class="plain">main( </code><code class="keyword bold">void</code> <code class="plain">)</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>24</code></td><td class="content"><code class="plain">{</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>25</code></td><td class="content"><code class="comments">//global interrupts are enabled</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>26</code></td><td class="content"><code class="plain">__enable_interrupt();</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>27</code></td><td class="content"><code class="comments">//for more about timer go to <a href="http://bit.ly/atmega_timer%C2%A0">http://bit.ly/atmega_timer&nbsp;</a> </code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>28</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>29</code></td><td class="content"><code class="plain">TIMSK0=0x02; </code><code class="comments">// enabled timer overflow interrupt;</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>30</code></td><td class="content"><code class="comments">// or TIMSK0 |= (1&lt;&lt;TOIE0);</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>31</code></td><td class="content"><code class="plain">TCCR0A = 0x00; </code><code class="comments">// normal operation (mode0);</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>32</code></td><td class="content"><code class="plain">TCNT0=0x0000; </code><code class="comments">// 8it counter register</code></td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>33</code></td><td class="content"><code class="plain">TCCR0B = 0x05; </code><code class="comments">// start timer/ set clock/ prescalaer - 1024</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>34</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>35</code></td><td class="content"><code class="comments">//Attiny13 pin 2 is enabled as output</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>36</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>37</code></td><td class="content"><code class="plain">DDRB=0x08;</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>38</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>39</code></td><td class="content"><code class="keyword bold">while</code> <code class="plain">(1) {</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>40</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>41</code></td><td class="content"><code class="plain">}</code></td></tr></tbody></table></div><div class="line alt2"><table><tbody><tr><td class="number"><code>42</code></td><td class="content">&nbsp;</td></tr></tbody></table></div><div class="line alt1"><table><tbody><tr><td class="number"><code>43</code></td><td class="content"><code class="plain">}</code></td></tr></tbody></table></div></div></div>
<p>Go Project =&gt; Make or just press F7 and if everything is ok you should see something similar:</p>
<p><a href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/build.png"><img class="alignnone size-full wp-image-353" title="build" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/build.png" alt="" width="266" height="203" pagespeed_url_hash="2907343498"></a></p>
<p>Project output file *.hex is saved in project directory you had selected at \Debug\Exe\.</p>
<p>Only one step left, upload program to Attiny13.&nbsp; I use <a href="http://www.fischl.de/usbasp/" target="_blank">USBasp programmer </a>with <a href="http://www.khazama.com/project/programmer/" target="_blank">Khazama AVR Programmer</a> to upload program(*.hex).</p>
<p>6 pins must be connected to programmer:</p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/schematic_programic.png"><img class="alignnone size-medium wp-image-363" title="schematic_programic" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/schematic_programic-300x125.png" alt="" width="300" height="125" pagespeed_url_hash="439231138"></a></p>
<p>Like this <img src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/icon_smile.gif" alt=":)" class="wp-smiley" pagespeed_url_hash="1100455380"> </p>
<p><a href="http://www.electronicsblog.net/wp-content/uploads/P1020262.jpg"><img class="alignnone size-medium wp-image-364" title="P1020262" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/P1020262-300x225.jpg" alt="" width="300" height="225" pagespeed_url_hash="2546227546"></a></p>
<p>And final result:</p>
<p><iframe title="YouTube video player" width="500" height="311" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/6GYvl5bv170.htm" frameborder="0" allowfullscreen=""></iframe></p>
<div class="shr-publisher-339 shareaholic-show-on-load" style="margin-left: 42px; overflow: hidden; height: 96px;"><div class="shr-bookmarks shr-bookmarks-bg-shr" style="margin-left: 10px; height: 100%; overflow: hidden; display: block; padding: 26px 0px 0px 10px; background-image: url(http://www.electronicsblog.net/wp-content/plugins/sexybookmarks/images/sharing-caring.png); background-color: transparent; background-position: initial initial; background-repeat: no-repeat no-repeat;"><ul class="shr-socials"><li class="shr-2 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=2&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Post to Delicious">Post to Delicious</a></li><li class="shr-3 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=3&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Post to Digg">Post to Digg</a></li><li class="shr-40 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=40&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Add to Reddit">Add to Reddit</a></li><li class="shr-38 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=38&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Post to StumbleUpon">Post to StumbleUpon</a></li><li class="shr-7 shareaholic" style="margin-left:0px !important;"><a rel="nofollow" target="_blank" class="external" orig_title="Post to Twitter">Post to Twitter</a></li><li class="shr-5 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=5&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Post to Facebook">Post to Facebook</a></li><li class="shr-52 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=52&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Send via Gmail">Send via Gmail</a></li><li class="shr-88 shareaholic" style="margin-left:0px !important;"><a href="http://www.shareaholic.com/api/share/?title=Start+with+IAR+Embedded+Workbench+for+Atmel+AVR%3A+Attiny13+LED+blink+with++timer+interrupt+++&link=http%3A%2F%2Fwww.electronicsblog.net%2Fstart-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt%2F&notes=&short_link=&shortener=google&shortener_key=&v=1&apitype=1&apikey=8afa39428933be41f8afdb8ea21a495c&source=Shareaholic-Publishers&template=&service=88&ctype=" rel="nofollow" target="_blank" class="external" orig_title="Add to LinkedIn">Add to LinkedIn</a></li></ul><div style="clear: both;"></div><div class="shr-getshr" style="visibility:hidden;font-size:10px !important"><a target="_blank" href="http://www.shareaholic.com/?src=pub">Get Shareaholic for Google Chrome</a></div><div style="clear: both;"></div><style type="text/css">ul.shr-socials li.shareaholic{background-image:url(http://www.electronicsblog.net/wp-content/plugins/sexybookmarks/spritegen_default/sprite.png) !important;}</style></div></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><!-- Start Shareaholic Recommendations Automatic --><div class="shr_rd-339"><div class="shareaholic-recommendations-container shareaholic-ui shareaholic-contains-6 shareaholic-divisible-2 shareaholic-divisible-3 shareaholic-divisible-6 small" style="height: 0px; display: none;"><div class="shareaholic-recommendations-header">You may also like:</div><div class="shareaholic-recommendations"></div><div class="shareaholic-recommendations-footer"><a class="shareaholic-recommendations-attribution" target="_blank" href="https://shareaholic.com/publishers/recommendations/?src=relatedapp&src_ref=www.electronicsblog.net" title="Powered by Shareaholic"><span class="shareaholic-recommendations-attribution-text">[ what's this ]</span><i class="shareaholic-recommendations-attribution-logo"></i></a></div></div></div><!-- End Shareaholic Recommendations Automatic -->			</div><!-- .entry-content -->

	<footer class="entry-meta">
		This entry was posted in <a href="http://www.electronicsblog.net/category/attiny13-2/" title="View all posts in ATtiny13" rel="category tag">ATtiny13</a> and tagged <a href="http://www.electronicsblog.net/tag/attiny13/" rel="tag">Attiny13</a>, <a href="http://www.electronicsblog.net/tag/iar-embedded-workbench-for-atmel-avr/" rel="tag">IAR Embedded Workbench for Atmel AVR</a>, <a href="http://www.electronicsblog.net/tag/interrupt/" rel="tag">interrupt</a>, <a href="http://www.electronicsblog.net/tag/timer/" rel="tag">timer</a> by <a href="http://www.electronicsblog.net/author/dariusss/">Darius</a>. Bookmark the <a href="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net.htm" title="Permalink to Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt" rel="bookmark">permalink</a>.		
			</footer><!-- .entry-meta -->
</article><!-- #post-339 -->

					
<div id="disqus_thread"><iframe id="dsq-2" data-disqus-uid="2" allowtransparency="true" frameborder="0" tabindex="0" title="Disqus" width="100%" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/saved_resource.htm" scrolling="no" horizontalscrolling="no" verticalscrolling="no" style="width: 100% !important; border: none !important; overflow: hidden !important; height: 462px !important;"></iframe></div>

<script type="text/javascript">//<![CDATA[
var disqus_url='http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/';var disqus_identifier='339 http://www.electronicsblog.net/?p=339';var disqus_container_id='disqus_thread';var disqus_domain='disqus.com';var disqus_shortname='electronics';var disqus_title="Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt";var disqus_config=function(){var config=this;config.language='';config.callbacks.preData.push(function(){document.getElementById(disqus_container_id).innerHTML='';});config.callbacks.onReady.push(function(){var script=document.createElement('script');script.async=true;script.src='?cf_action=sync_comments&post_id=339';var firstScript=document.getElementsByTagName("script")[0];firstScript.parentNode.insertBefore(script,firstScript);});};
//]]></script>

<script type="text/javascript">//<![CDATA[
var DsqLocal={'trackbacks':[{'author_name':"Atmega328 Development Kit | electronicsblog.net",'author_url':"http:\/\/www.electronicsblog.net\/atmega328-development-kit\/",'date':"11\/05\/2011 06:00 PM",'excerpt':"[...] write code using IAR Embedded Workbench for Atmel AVR , you can also use open and more popular [...] ",'type':"pingback"}],'trackback_url':"http:\/\/www.electronicsblog.net\/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt\/trackback\/"};
//]]></script>

<script type="text/javascript">//<![CDATA[
(function(){var dsq=document.createElement('script');dsq.type='text/javascript';dsq.async=true;dsq.src='//'+disqus_shortname+'.'+'disqus.com'+'/embed.js?pname=wordpress&pver=2.74';(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(dsq);})();
//]]></script>

				
			</div><!-- #content -->
		</div><!-- #primary -->


	</div><!-- #main -->

	<footer id="colophon" role="contentinfo">

			

			<div id="site-generator">
								<a href="http://wordpress.org/" title="Semantic Personal Publishing Platform">Proudly powered by WordPress</a>
			</div>
	</footer><!-- #colophon -->
</div><!-- #page -->

<img alt="css.php" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/css.php" width="1" height="1" pagespeed_url_hash="1293472794"><div style="display: none;"><a href="http://www.electronicsblog.net/printedblue.php">Bear</a></div><script type="text/javascript">var SHRSB_Settings={"shr-publisher-339":{"link":"http:\/\/www.electronicsblog.net\/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt\/","shortener":"google","title":"Start with IAR Embedded Workbench for Atmel AVR: Attiny13 LED blink with  timer interrupt   ","notes":"%0D%0AThis%20short%20guide%20is%20about%20starting%20first%20project%20with%20IAR%20Embedded%20Workbench%20for%20Atmel%20AVR.%20IDE%20is%20not%20free%2C%20bet%20there%20is%20free%20KickStart%20edition%20with%204KB%20code%20limit.%0D%0A%0D%0A%0D%0A%0D%0AAfter%20IAR%20Embedded%20Workbench%20launch%20choose%20to%20create%20a%20new%20project.%0D%0A%0D%0A%0D%0A%0D%0APlease%20select%20%22C%22%20and%20AVR%20Studio%20compatible%20output","service":"2,3,40,38,7,5,52,88","apikey":"8afa39428933be41f8afdb8ea21a495c","expand":true,"src":"http:\/\/www.electronicsblog.net\/wp-content\/plugins\/sexybookmarks\/spritegen_default","localize":true,"share_src":"http:\/\/www.shareaholic.com","rel":"nofollow","target":"_blank","bgimg":"http:\/\/www.electronicsblog.net\/wp-content\/plugins\/sexybookmarks\/images\/sharing-caring.png","bgimg_padding":"26px 0 0 10px","center":true,"twitter_template":"%24%7Btitle%7D+-+%24%7Bshort_link%7D","mode":"inject","designer_toolTips":"1","tip_bg_color":"#000000","tip_text_color":"#ffffff","shrlink":"1"}};</script><script type="text/javascript">var SHRRD_Settings={"shr_rd-339":{"link":"http:\/\/www.electronicsblog.net\/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt\/","apikey":"8afa39428933be41f8afdb8ea21a495c","style":"image"}};</script><script type="text/javascript">//<![CDATA[
var SHRSB_Globals={"src":"http:\/\/www.electronicsblog.net\/wp-content\/plugins\/sexybookmarks\/spritegen_default","perfoption":null,"twitter_template":"%24%7Btitle%7D+-+%24%7Bshort_link%7D","locale":"0","shortener":"google","shortener_key":"","pubGaSocial":0,"pubGaKey":""};
//]]></script><script src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/shCore.js,,qver==2.1.364,Mjm.dX-s694vQg.js+shBrushCpp.js,,qver==2.1.364,Mjm.b.js"></script><script>eval(mod_pagespeed_n60Tb7q4e0);</script>
<script>eval(mod_pagespeed_5WgMB4Lj1p);</script>
<script type="text/javascript">(function(){var corecss=document.createElement('link');var themecss=document.createElement('link');var corecssurl="http://www.electronicsblog.net/wp-content/plugins/syntaxhighlighter/syntaxhighlighter2/styles/shCore.css?ver=2.1.364";if(corecss.setAttribute){corecss.setAttribute("rel","stylesheet");corecss.setAttribute("type","text/css");corecss.setAttribute("href",corecssurl);}else{corecss.rel="stylesheet";corecss.href=corecssurl;}
document.getElementsByTagName("head")[0].insertBefore(corecss,document.getElementById("syntaxhighlighteranchor"));var themecssurl="http://www.electronicsblog.net/wp-content/plugins/syntaxhighlighter-arduino/shThemeArduino.css?ver=2.1.364";if(themecss.setAttribute){themecss.setAttribute("rel","stylesheet");themecss.setAttribute("type","text/css");themecss.setAttribute("href",themecssurl);}else{themecss.rel="stylesheet";themecss.href=themecssurl;}
document.getElementsByTagName("head")[0].insertBefore(themecss,document.getElementById("syntaxhighlighteranchor"));})();SyntaxHighlighter.config.clipboardSwf='http://www.electronicsblog.net/wp-content/plugins/syntaxhighlighter/syntaxhighlighter2/scripts/clipboard.swf';SyntaxHighlighter.config.strings.expandSource='show source';SyntaxHighlighter.config.strings.viewSource='view source';SyntaxHighlighter.config.strings.copyToClipboard='copy to clipboard';SyntaxHighlighter.config.strings.copyToClipboardConfirmation='The code is in your clipboard now';SyntaxHighlighter.config.strings.print='print';SyntaxHighlighter.config.strings.help='?';SyntaxHighlighter.config.strings.alert='SyntaxHighlighter\n\n';SyntaxHighlighter.config.strings.noBrush='Can\'t find brush for: ';SyntaxHighlighter.config.strings.brushNotHtmlScript='Brush wasn\'t configured for html-script option: ';SyntaxHighlighter.defaults['pad-line-numbers']=false;SyntaxHighlighter.all();</script>
<script type="text/javascript" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/jquery.shareaholic-publishers-sb.min.js"></script>
<script type="text/javascript" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/jquery.shareaholic-publishers-rd.min.js"></script>

<script pagespeed_no_defer="">//<![CDATA[
(function(){var e=encodeURIComponent,f=window,h=document,m="width",n="documentElement",p="height",q="length",r="prototype",s="body",t="&",u="&ci=",w="&n=",x="&rd=",y=",",z="?",A="Content-Type",B="Microsoft.XMLHTTP",C="Msxml2.XMLHTTP",D="POST",E="application/x-www-form-urlencoded",F="img",G="input",H="load",I="oh=",J="on",K="pagespeed_url_hash",L="url=",M=function(a,c,d){if(a.addEventListener)a.addEventListener(c,d,!1);else if(a.attachEvent)a.attachEvent(J+c,d);else{var b=a[J+c];a[J+c]=function(){d.call(this);b&&b.call(this)}}};f.pagespeed=f.pagespeed||{};var N=f.pagespeed,O=function(a,c,d,b,g){this.d=a;this.f=c;this.g=d;this.a=g;this.c={height:f.innerHeight||h[n].clientHeight||h[s].clientHeight,width:f.innerWidth||h[n].clientWidth||h[s].clientWidth};this.e=b;this.b={}};O[r].j=function(a){a=a.getBoundingClientRect();return{top:a.top+(void 0!==f.pageYOffset?f.pageYOffset:(h[n]||h[s].parentNode||h[s]).scrollTop),left:a.left+(void 0!==f.pageXOffset?f.pageXOffset:(h[n]||h[s].parentNode||h[s]).scrollLeft)}};O[r].i=function(a){if(0>=a.offsetWidth&&0>=a.offsetHeight)return!1;a=this.j(a);var c=a.top.toString()+y+a.left.toString();if(this.b.hasOwnProperty(c))return!1;this.b[c]=!0;return a.top<=this.c[p]&&a.left<=this.c[m]};O[r].l=function(){for(var a=[F,G],c=[],d={},b=0;b<a[q];++b)for(var g=h.getElementsByTagName(a[b]),k=0;k<g[q];++k){var v=g[k].getAttribute(K);v&&g[k].getBoundingClientRect&&this.i(g[k])&&!(v in d)&&(c.push(v),d[v]=!0)}b=!1;a=I+this.g;this.a&&(a+=w+this.a);if(0!=c[q]){a+=u+e(c[0]);for(b=1;b<c[q];++b){d=y+e(c[b]);if(131072<a[q]+d[q])break;a+=d}b=!0}this.e&&(d=x+e(JSON.stringify(this.h())),131072>=a[q]+d[q]&&(a+=d),b=!0);N.criticalImagesBeaconData=a;if(b){var c=this.d,b=this.f,l;if(f.XMLHttpRequest)l=new XMLHttpRequest;else if(f.ActiveXObject)try{l=new ActiveXObject(C)}catch(P){try{l=new ActiveXObject(B)}catch(Q){}}l&&(l.open(D,c+(-1==c.indexOf(z)?z:t)+L+e(b)),l.setRequestHeader(A,E),l.send(a))}};O[r].h=function(){for(var a={},c=h.getElementsByTagName(F),d=0;d<c[q];++d){var b=c[d],g=b.getAttribute(K);if("undefined"==typeof b.naturalWidth||"undefined"==typeof b.naturalHeight||"undefined"==typeof g)break;if("undefined"==typeof a[b.src]&&0<b[m]&&0<b[p]&&0<b.naturalWidth&&0<b.naturalHeight||"undefined"!=typeof a[b.src]&&b[m]>=a[b.src].n&&b[p]>=a[b.src].m)a[g]={renderedWidth:b[m],renderedHeight:b[p],originalWidth:b.naturalWidth,originalHeight:b.naturalHeight}}return a};N.k=function(a,c,d,b,g){var k=new O(a,c,d,b,g);M(f,H,function(){f.setTimeout(function(){k.l()},0)})};N.criticalImagesBeaconInit=N.k;})();pagespeed.criticalImagesBeaconInit('/mod_pagespeed_beacon','http://www.electronicsblog.net/start-with-iar-embedded-workbench-for-atmel-avr-attiny13-led-blink-with-timer-interrupt/','vcI6B1KTCY',false,'kHtkTC3HxDg');
//]]></script>
<iframe id="shr_oven" src="./Start with IAR Embedded Workbench for Atmel AVR  Attiny13 LED blink with timer interrupt   electronicsblog.net_files/analytics_frame.htm" style="display: none;"></iframe></body></html>